package com.bgs.mapper;

import com.bgs.pojo.BeforeUser;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.bgs.pojo.vo.BeforeMessage;
import com.bgs.pojo.vo.ZeroReturnGoods;
import org.apache.ibatis.annotations.Select;

import java.util.List;



/**
 * <p>
 * 前台用户表 Mapper 接口
 * </p>
 *
 * @author Asia
 * @since 2021-09-14
 */
public interface BeforeUserMapper extends BaseMapper<BeforeUser> {
    //查询所有用户
    List<BeforeUser> fourQueryAll(BeforeUser beforeUser);
    //修改
    Integer fourEditUser(BeforeUser beforeUser);
    @Select("select before_user_email from before_user where before_user_email=#{email}")
    BeforeUser ThreeSend(String email);

    boolean zeroBeforeUserDelete2(Integer beforeUserId);

    BeforeUser zeroFindBeforeUserByBeforeUserId(Integer beforeUserId);

    boolean ThreeZhuCe(String email);

    boolean ThreeAddUser(BeforeUser beforeUser);

    @Select("select * from before_user where before_user_email=#{beforeUserEmail}")
    List<BeforeUser> ThreeFindUserEmail(String beforeUserEmail);

    String selectId(int i);

    @Select("select before_user_id,before_user_name,before_user_img from before_user where before_user_id=#{beforeUserId}")
    BeforeUser ThreeFindId(String beforeUserId);

    List<BeforeUser> zeroBeforeUserIdToBeforeUser(Integer beforeUserId);

    boolean zeroReturnGoodsSubtractBalance(Integer beforeUserId, Double returnGoodsPayment);

    boolean zeroReturnGoodsAddBalance(ZeroReturnGoods zeroReturnGoods);
    //查看用户余额
    BeforeUser TowBalance(Integer beforeUserId);
}
